 /*	
  *				
  *					ISNW ---- It is a war.It is not warcraft!
  *
  *
  *					Author:					zhoukeli(haxixi_keli)
  *					Filename:				Random.h
  *					CreateTime:				2008/12/30
  *					ModifyTime:				2008/12/30
  *
  */

#ifndef __ISNW_RANDOM_H__
#define __ISNW_RANDOM_H__

#include "isnwTypes.h"
#include "ITimer.h"

namespace ISNW
{
namespace os
{
	class Random
	{
	public:
		static s32 rand(s32 min,s32 max)
		{
			if(max <= min) return min;

			u32 time = os::Timer::getTime();
			
			u32 stride = (u32)(max - min);

			u32 num = time % stride;

			return (min + num);
		}
	};

} // end namespace os
} // end namespace ISNW
#endif
